import QtQuick 2.0
import "../../../customqml"
Rectangle{
    Loader{
        id:delegateLoader
        anchors.centerIn: parent
        anchors.fill: parent
    }
    NormalBtn{
        x:220
        y:100
        id:bt_1
        text: "代理1---普通"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    delegateLoader.source="/qml/main/QmlInBookMain/ViewModelSub/Delegate_Test1.qml"
                }
            }
        }
    }
    NormalBtn{
        x:320
        y:100
        id:bt_2
        text: "代理2---动态增删"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    delegateLoader.source="/qml/main/QmlInBookMain/ViewModelSub/Delegate_Test2.qml"
                }
            }
        }
    }
    NormalBtn{
        x:420
        y:100
        id:bt_3
        text: "代理3---变形代理"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    delegateLoader.source="/qml/main/QmlInBookMain/ViewModelSub/Delegate_Test3.qml"
                }
            }
        }
    }
}


